package com.ruoyi.lxzx.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.lxzx.mapper.ActivityGuestMapper;
import com.ruoyi.lxzx.domain.ActivityGuest;
import com.ruoyi.lxzx.service.IActivityGuestService;

/**
 * 活动嘉宾Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-26
 */
@Service
public class ActivityGuestServiceImpl implements IActivityGuestService 
{
    @Autowired
    private ActivityGuestMapper activityGuestMapper;

    /**
     * 查询活动嘉宾
     * 
     * @param id 活动嘉宾主键
     * @return 活动嘉宾
     */
    @Override
    public ActivityGuest selectActivityGuestById(Long id)
    {
        return activityGuestMapper.selectActivityGuestById(id);
    }

    /**
     * 查询活动嘉宾列表
     * 
     * @param activityGuest 活动嘉宾
     * @return 活动嘉宾
     */
    @Override
    public List<ActivityGuest> selectActivityGuestList(ActivityGuest activityGuest)
    {
        return activityGuestMapper.selectActivityGuestList(activityGuest);
    }

    /**
     * 新增活动嘉宾
     * 
     * @param activityGuest 活动嘉宾
     * @return 结果
     */
    @Override
    public int insertActivityGuest(ActivityGuest activityGuest)
    {
        activityGuest.setCreateTime(DateUtils.getNowDate());
        return activityGuestMapper.insertActivityGuest(activityGuest);
    }

    /**
     * 修改活动嘉宾
     * 
     * @param activityGuest 活动嘉宾
     * @return 结果
     */
    @Override
    public int updateActivityGuest(ActivityGuest activityGuest)
    {
        activityGuest.setUpdateTime(DateUtils.getNowDate());
        return activityGuestMapper.updateActivityGuest(activityGuest);
    }

    /**
     * 批量删除活动嘉宾
     * 
     * @param ids 需要删除的活动嘉宾主键
     * @return 结果
     */
    @Override
    public int deleteActivityGuestByIds(Long[] ids)
    {
        return activityGuestMapper.deleteActivityGuestByIds(ids);
    }

    /**
     * 删除活动嘉宾信息
     * 
     * @param id 活动嘉宾主键
     * @return 结果
     */
    @Override
    public int deleteActivityGuestById(Long id)
    {
        return activityGuestMapper.deleteActivityGuestById(id);
    }
}
